Skip to content

Datepicker: allows the correct use of 0-99 years,#1262

Closed
BrunoRB wants to merge 2 commits intojquery:masterfrom
BrunoRB:fix-7098
Closed

Datepicker: allows the correct use of 0-99 years,#1262
BrunoRB wants to merge 2 commits intojquery:masterfrom
BrunoRB:fix-7098

Conversation

@BrunoRB
Copy link

@BrunoRB BrunoRB commented Jun 8, 2014

Fixes #7098, http://bugs.jqueryui.com/ticket/7098.
The cause of the bug is relatively simple, javascript date constructor cast 0-99 years to 1900-1999. In order to fix this I had to introduce the "_getDateObjectWithFixedYear" function and change all the "new Date(year, month, day)" calls to this new function.
Also, this fix only applies when "shortYearCutoff" is setted to 0.

BrunoRB added 2 commits June 8, 2014 18:05
Fixes the problem where the years [0-99] were being converted to [1900-1999].
Fixes #7098.
@brunobg
Copy link

brunobg commented Nov 5, 2014

Any news on this one?

@scottgonzalez
Copy link
Member

Thanks for the patch. Unfortunately, large changes to datepicker tend to result in unforeseen regressions. Since we have a lot of work done on the datepicker rewrite already, we'll just wait for that to fix the bug.

@brunobg
Copy link

brunobg commented May 8, 2015

This is a known bug which has been open for years, with a valid patch that was submitted according to your guidelines and that passes your tests. It makes no sense to just sweep it under the rug :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants